package com.msk.wlhy.service;

import com.msk.sys.service.CrudService;
import com.msk.wlhy.domain.TransportCapacitySupplierRel;
import com.msk.wlhy.mapper.TransportCapacitySupplierRelDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * Table: transport_capacity_supplier_rel(运力货源承运商关联表)Service
 *
 * @author wlxiang
 *
 * @version 20201117
 */
@Service
@Transactional(readOnly = true)
public class TransportCapacitySupplierRelService extends CrudService<TransportCapacitySupplierRelDao, TransportCapacitySupplierRel> {
    @Autowired
    private TransportCapacitySupplierRelDao transportCapacitySupplierRelDao;

    public  TransportCapacitySupplierRel get(String id){
       return super.get(id);
    }

    public List<TransportCapacitySupplierRel> findListByPhone(TransportCapacitySupplierRel transportCapacitySupplierRel){
        return dao.findListByPhone(transportCapacitySupplierRel);
    }
//    public Page<TransportCapacitySupplierRel> findListByPhone(Page<TransportCapacitySupplierRel> page, TransportCapacitySupplierRel transportCapacitySupplierRel){
//        transportCapacitySupplierRel.setPage(page);
//        page.setList(dao.findListByPhone(transportCapacitySupplierRel));
//        return page;
//    }
//
//    public Page<TransportCapacitySupplierRel> transportCapacitySupplierRelPool(Page<TransportCapacitySupplierRel> page, TransportCapacitySupplierRel transportCapacitySupplierRel){
//        transportCapacitySupplierRel.setPage(page);
//        page.setList(dao.transportCapacitySupplierRelPool(transportCapacitySupplierRel));
//        return page;
//    }
//
    public TransportCapacitySupplierRel getTransportCapacitySupplierRel(TransportCapacitySupplierRel transportCapacitySupplierRel){
       return dao.getTransportCapacitySupplierRel(transportCapacitySupplierRel);
    }
//
//    public Page<TransportCapacitySupplierRel> findCapacityList(Page<TransportCapacitySupplierRel> page, TransportCapacitySupplierRel transportCapacitySupplierRel){
//        transportCapacitySupplierRel.setPage(page);
//        page.setList(dao.findCapacityList(transportCapacitySupplierRel));
//        return page;
//    }
    
    public Long findCount(TransportCapacitySupplierRel transportCapacitySupplierRel){
        return transportCapacitySupplierRelDao.findCount(transportCapacitySupplierRel);
    }
    /**
     * @author 作者: yangjy
     * @description 描述:承运商中我的运力查看运力详情
     * @date 时间: 2023/5/26 10:36
     * @return 返回值: List<TransportCapacitySupplierRel>
     */
    public List<Map<String, Object>> findCarByDriverId(String driverId){
        return transportCapacitySupplierRelDao.findCarByDriverId(driverId);
    }

    public List<Map<String,Object>> findSupplierRelList(TransportCapacitySupplierRel transportCapacitySupplierRel){
        return transportCapacitySupplierRelDao.findSupplierRelList(transportCapacitySupplierRel);
    }

    public List<Map<String,Object>> suppilerMyCapacity(TransportCapacitySupplierRel transportCapacitySupplierRel){
        return transportCapacitySupplierRelDao.suppilerMyCapacity(transportCapacitySupplierRel);
    }
}
